<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>天书榜 | 小说更新 </title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" type="image/png" sizes="32x32" href="icon/favicon-32x32.png">
    <link rel="icon" type="image/png" sizes="16x16" href="icon/favicon-16x16.png">
    <link rel="stylesheet" href="admin/plugins/fontawesome-free/css/all.min.css">
    <link rel="stylesheet" href="css/ionicons/2.0.1/ionicons.min.css">
    <link rel="stylesheet" href="admin/css/adminlte.min.css">
    <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
</head>
<body class="hold-transition sidebar-mini">
<div class="wrapper">
    <nav class="main-header navbar navbar-expand navbar-white navbar-light">
        <ul class="navbar-nav">
            <li class="nav-item">
                <a class="nav-link" data-widget="pushmenu" href="#"><i class="fas fa-bars"></i></a>
            </li>
        </ul>
        <ul class="navbar-nav ml-auto">
            <li class="nav-item dropdown">
                <a class="nav-link" data-toggle="dropdown" href="#">
                    <i class="far fa-user text-gray"></i>
                </a>
                <div class="dropdown-menu dropdown-menu-lg dropdown-menu-right">
                    <div class="dropdown-divider"></div>
                    <a href="javascript:void(0);" class="dropdown-item" onclick="logout();">
                        <i class="fas fa-sign-out-alt mr-2"></i>登出
                    </a>
                </div>
            </li>
        </ul>
    </nav>

    <#include "./sideMenu.ftl">

    <section class="content-wrapper">
        <section class="content-header">
            <div class="container-fluid">
                <div class="row mb-2">
                    <div class="col-sm-6">
                        <h1>更新小说</h1>
                    </div>
                    <div class="col-sm-6">
                        <ol class="breadcrumb float-sm-right">
                            <li class="breadcrumb-item"><a href="#">主页</a></li>
                            <li class="breadcrumb-item active">更新小说</li>
                        </ol>
                    </div>
                </div>
            </div>
        </section>

        <section class="content">
            <div class="row">
                <div class="col-md-12">
                    <div class="card card-primary">
                        <div class="card-header">
                            <h3 class="card-title">必填</h3>
                            <span id="fiction-id-container" value="${fictionid}" hidden></span>
                            <div class="card-tools">
                                <button type="button" class="btn btn-tool" data-card-widget="collapse"
                                        data-toggle="tooltip" title="Collapse">
                                    <i class="fas fa-minus"></i></button>
                            </div>
                        </div>
                        <div class="card-body">
                            <div class="form-group">
                                <label for="inputName">题目</label>
                                <input type="text" id="fiction-title" class="form-control" value="${title}">
                            </div>
                            <div class="form-group">
                                <label for="inputDescription">详细信息</label>
                                <textarea id="fiction-description" class="form-control" rows="4">${description}</textarea>
                            </div>
                            <div class="row">
                                <div class="form-group col-3">
                                    <label for="inputStatus">分类</label>
                                    <select id="catlog-selection" class="form-control custom-select" onchange="fictionAddOnCatlogSelectionClick()">
                                        <option selected disabled>选择类型</option>
<#--                                        <#list catloglist as catlog>-->
<#--                                            <option>${catlog}</option>-->
<#--                                        </#list>-->
                                    </select>
                                </div>
                                <div class="form-group col-3">
                                    <label for="inputStatus">子类型</label>
                                    <select id="subcatlog-selection" class="form-control custom-select">
                                        <option selected disabled>选择类型</option>
                                    </select>
                                </div>
                            </div>
                            <div class="row">
                                <div class="form-group col-3">
                                    <label for="inputClientCompany">完本时间（年，4位数字）</label>
                                    <input type="text" id="fiction-finish-year" class="form-control" value="${finishyear}">
                                </div>
                            </div>
                            <div class="row">
                                <div class="form-group col-6">
                                    <label for="inputProjectLeader">作者</label>
                                    <input type="text" id="fiction-author" class="form-control" value="${author}">
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-12">
                                    <#if finished>
                                        <input type="checkbox" id="fiction-finished-checkbox" value="agree" checked>
                                    <#else>
                                        <input type="checkbox" id="fiction-finished-checkbox" value="agree">
                                    </#if>
                                    <label>已完本</label>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="row">
                <div class="col-12">
                    <a href='/fictionlist' class="btn btn-secondary">放弃</a>
                    <button class="btn btn-success" onclick="fictionUpdateOnFinishFictionClick();">更新</button>
                </div>
            </div>
            <section class="content-header">
                <div class="container-fluid">
                    <ul id="post-fiction-result" class="mb-2">

                    </ul>
                </div>
            </section>
        </section>
    </section>

    <footer class="main-footer">
        <span> &copy; ${year2year} <strong><a href="http://tianshubang.com">tianshubang.com</a></strong> 版权所有 (v 1.0.1)</span>
        <span class="ml-2 mr-2 text-gray">|</span>
        <a href="/articlerepository"><u class="text-gray">小说索引</u></a>
        <span class="ml-2 mr-2 text-gray">|</span>
        <a href="/authorrepository"><u class="text-gray">作者索引</u></a>
    </footer>
</div>

<script src="admin/plugins/jquery/jquery.min.js"></script>
<script src="plugin/bloodhound.min.js"></script>
<script src="plugin/bootstrap-typeahead.min.js"></script>
<script src="admin/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="admin/js/adminlte.min.js"></script>
<script src="utility.js"></script>
<script src="script/page/fictionupdate.js"></script>

</body>
</html>
